1. Field of the Invention
This invention relates generally to computer controlled printing of documents having text and graphical components and more particularly to a method and system for handling dictionary generation and context declaration in a structured page description language intended to be printed or displayed. In this regard, the presentation of a document on a page involves the printing of a page on a fixed medium such as paper, transparency or the like, or presenting a page on a visual display or transmitting to another device the document in a form to be presented or stored. This invention is particularly useful for the automatic translation between the different data and printing formats used for a variety of presentation devices. This invention is also useful for the transmission of data to other devices in a communication system. The present application is related to commonly owned co-pending U.S. patent application Ser. No. 07/778,578, filed on Oct. 17, 1991, and U.S. patent applications Ser. Nos. 07/876,251, and 07/876,601, filed on Apr. 30, 1992, each of these disclosures being incorporated by reference herein.
2. Discussion of the Background
The development of laser printers in the early 1970s provided an opportunity for high quality, low cost printing of documents, which contained not only character text but also general graphical material. The primary method of controlling commands by the computer to the printer employed the so called "escape sequence" commands, similar to the type of commands used in the DIABLO.RTM. command sequence. These types of commands were distinguished from typical character data by preceding each command with a special byte, generally an escape character (ASCII 27). This methodology works acceptably with daisy wheel or dot matrix printers but is not well suited for printing documents that might have changing requirements. For example, as needs change and as technology improves, an upgrade to the presentation device is necessary. This type of upgrade in the past would have required removal of the program controller of conventional presentation devices. At a minimum, a new PROM containing instructions for the printer would be required. This is not a commercially acceptable way of handling temporary changes, as a new PROM would be installed for a few print jobs, and would then have to be replaced with the original PROM or another new PROM. This method of upgrade is wasteful and results in many failures of the presentation device controller.
The present inventor recognized a need to provide a dictionary approach to the above problem where dictionary definitions, which could be accessed as part of the content of a structured inputted data stream, are provided to the presentation device.
As a response to the limitations inherent in the escape sequence commands, different types of "page description language" (PDL) were developed generally to control laser printers or other types of page printers. Backward compatibility of these laser printers was provided by way of an ability to accept escape sequence commands. Two current examples of page description language are the PostScript.RTM. system from Adobe Systems Incorporated and InterPress.RTM. from Xerox.RTM. Corporation. Several other proprietary PDLs are also known.
The prior art page description languages provided various improvements to the standard escape sequences known previously, such as by providing tools and syntax for manipulation of objects, or by providing for the use of operand stacks or the like. Moreover, they are stack-oriented programming languages. These languages also allowed, in some cases, for dynamic changes in the printer's state, such as the ability to add fonts or graphical images to the resources that might be available to the printer. Some of these features are documented in such generally available reference works as Adobe System Incorporated's "PostScript Language Reference Manual" and the "PostScript Language Program Design," both by Addison-Wesley Publishing Company (1985 and 1988, respectively). Other PDLs are also described in various technical and reference books such as "InterPress, The Source Book" by Harrington et al. (Simon and Schuster, Inc., 1988).
A standardized page description language has been proposed and is being developed as an international standard by the ISO. The proposal, to which the present inventor is a contributor, is currently in draft form before a section of the ISO. The draft is known as ISO/IEC DIS 10180 and is labeled "Information Processing Text Communication Standard Page Description Language." The current draft is dated 1991.
Many of the prior art types of page description languages suffer from various flaws. For example, one shortcoming of the PostScript.RTM. language is that a page description for a particular document can contain a new definition such as a resource definition (i.e. an additional font) or a new dictionary definition that can be used anywhere in the document. In other words, no structure is enforced in PostScript.RTM. and therefore, the entire content of the document must be processed to determine whether a particular printer has the resources necessary to print it. If this "preprocessing" is not performed, it is possible that the printing of a document may fail at any point during the printing process, even at the very end, due to the inability of the printer to comply with commands of the document page description.
Additional problems are associated with the prior art systems that employ PostScript.RTM.. For example, to print a given page of a document, it is generally necessary to read and process, before presenting a page, the entire PDL description of all the preceding pages of the document, in order to decide the state of the document page setup parameters (i.e., resource declarations, dictionary definitions or the like). In other words, a print controller program must read the entire PDL description of a document to consider the effect of every page setup command between the beginning of the document and the specified page. While this page setup scanning process is relatively straightforward, it does require a significant amount of processor time, which can be better used by the printer.
Additionally, there are no syntax or semantics defined in the PostScript.RTM. language to handle a structure, a prologue or a scope of a data declaration. There is a convention. This convention, however, does not need to be followed.
One problem with the well known InterPress.RTM. system from Xerox.RTM. is that its structure does not effectively handle dictionary definitions contained in an inputted data stream. Nor does InterPress.RTM. use the prologue structure in an expeditious manner. Also, the standard InterPress.RTM.encoding is binary rather than clear text which a human can read.
The ability to use or add dictionary definitions or to generate a standard dictionary allows for a "global" type of change to be provided in the presentation device. This is done so that documents containing a dictionary can be used to provide a library of sorts. For example, a shorthand in future documents can use a standardized shorthand, so that processing can be easily expedited in a future or even the same document data stream. The present invention permits the management of created read-only dictionaries in the hierarchial structure of a document data stream as discussed in U.S. Patent application Ser. No. 07/876,601. This invention allows for the deletion of dictionaries and other data structures at the end of their scope as shown in the aforementioned U.S. patent application Ser. No. 07/876,601.